ww<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<title>Role Details</title>
		<link rel="Stylesheet" href="${rootContext}/includes/${judo_style_css_document}" type="text/css" />
	</head>
	<body>		
		<div id="page">
			<div id="header">
				<jsp:include page="/header.jsp" flush="false"/>
			</div>
			<div id="navcontainer">
				${judo_menu}
			</div>
			<div id="content">
							<h3>Role Details</h3>
			<a href="${rootContext}/admin/Role_controller/display_role.do">View All Role</a>  | <a href="${rootContext}/admin/Role_controller/edit_role.do?id=${roleid}"><img src="${rootContext}/images/icon_edit.png" border=0 alt="Edit"> Edit This Record</a>  | <a href="${rootContext}/admin/Role_controller/delete_role.do?id=${roleid}"><img src="${rootContext}/images/icon_delete.png" border=0 alt="Delete"> Delete This Record</a><br>
			<br>
				<table>
					<tr>
						<td width="100">
							<b>Roleid</b>
						</td>
						<td>&nbsp;&nbsp;</td>
						<td width="200">
							${roleid}
						</td>
					</tr>
					<tr>
						<td>&nbsp;&nbsp;</td>
						<td>&nbsp;&nbsp;</td>
						<td>&nbsp;&nbsp;</td>
					</tr>
					<tr>
						<td width="100">
							<b>Rolename</b>
						</td>
						<td>&nbsp;&nbsp;</td>
						<td width="200">
							${rolename}
						</td>
					</tr>
					<tr>
						<td>&nbsp;&nbsp;</td>
						<td>&nbsp;&nbsp;</td>
						<td>&nbsp;&nbsp;</td>
					</tr>
					<tr>
						<td width="100">
							<b>Active</b>
						</td>
						<td>&nbsp;&nbsp;</td>
						<td width="200">
							${display_active}
						</td>
					</tr>
					<tr>
						<td>&nbsp;&nbsp;</td>
						<td>&nbsp;&nbsp;</td>
						<td>&nbsp;&nbsp;</td>
					</tr>
				</table>
				<h3>Add User to Role</h3>
				${validation_errors}
				<form action="admin/role_controller/add_user_to_role.do" method=POST>
				${validateForm}
					<input type="hidden" value="${roleid}" name="roleid">
					<select name="addedUser">
						${html_users}
					</select>
					<input type="submit" value="Add User">
				</form>
				<h3>Users Mapped to this Role</h3>
			<table class="standardTBL">
				<tr class="standardTBLHeader">
					<td>Userid</td>
					<td>Status</td>
					<td>Username</td>
					<td>Password</td>
					<td>Firstname</td>
					<td>Lastname</td>
					<td>Email</td>
					<td>Unit</td>
					<td>Division</td>
					<td>Remove</td>
				</tr>
				<c:forEach var="cur" items="${roleUsers}">
				<tr>
					<td><a href="${rootContext}/admin/user_controller/detail_users.do?id=${cur.userid}">${cur.userid}</a></td>
					<td>${cur.status}</td>
					<td>${cur.username}</td>
					<td>${cur.password}</td>
					<td>${cur.firstname}</td>
					<td>${cur.lastname}</td>
					<td>${cur.email}</td>
					<td>${cur.unit}</td>
					<td>${cur.division}</td>
					<td><a href="${rootContext}/admin/role_controller/remove_user_from_role.do?roleid=${roleid}&userid=${cur.userid}">Delete<a/></td>
				</tr>
				</c:forEach>
			</table>

			</div>
		</div>
	</body>
</html>
